# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.BigtableAdmin.V2.Model.ListHotTabletsResponse do
  @moduledoc """
  Response message for BigtableInstanceAdmin.ListHotTablets.

  ## Attributes

  *   `hotTablets` (*type:* `list(GoogleApi.BigtableAdmin.V2.Model.HotTablet.t)`, *default:* `nil`) - List of hot tablets in the tables of the requested cluster that fall within the requested time range. Hot tablets are ordered by node cpu usage percent. If there are multiple hot tablets that correspond to the same tablet within a 15-minute interval, only the hot tablet with the highest node cpu usage will be included in the response.
  *   `nextPageToken` (*type:* `String.t`, *default:* `nil`) - Set if not all hot tablets could be returned in a single response. Pass this value to `page_token` in another request to get the next page of results.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :hotTablets => list(GoogleApi.BigtableAdmin.V2.Model.HotTablet.t()) | nil,
          :nextPageToken => String.t() | nil
        }

  field(:hotTablets, as: GoogleApi.BigtableAdmin.V2.Model.HotTablet, type: :list)
  field(:nextPageToken)
end

defimpl Poison.Decoder, for: GoogleApi.BigtableAdmin.V2.Model.ListHotTabletsResponse do
  def decode(value, options) do
    GoogleApi.BigtableAdmin.V2.Model.ListHotTabletsResponse.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.BigtableAdmin.V2.Model.ListHotTabletsResponse do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
